package com.diandi.signature.enums.platfrom;

/**
 * Created by Administrator on 2017/7/3.
 */
public enum SourceType {
    PC("1","PC"),
    APP("2","APP"),
    WX("3","WX"),
    WAP("4","WAP"),
    ;
    private String type;
    private String typeName;

    SourceType(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public static SourceType getEmun(String type){
        for (SourceType sourceType : SourceType.values()) {
            if(sourceType.getType().equals(type)){
                return sourceType;
            }
        }
        return null;
    }
}
